import java.io.*;
public class forwhile{
    public static void main(String[] args)  throws IOException {
        char ch;
        System.out.println("按1/2/3可得大奖");
        System.out.println("按空格后再按回车键可退出循环操作");

        while ((ch = (char) System.in.read()) != ' '){
            System.in.skip(2);
            switch (ch) {
                case '1':
                    System.out.println("奖品1");
                    break;
                case '2':
                    System.out.println("奖品2");
                    break;
                case '3':
                    System.out.println("奖品3");
                    break;
                default:
                    System.out.println("没有中奖");
            }
        }
    }
}